import { Dimensions, PixelRatio } from 'react-native';

global.w = Dimensions.get('window').width;    //global全局，就不用导入导出了
global.h = Dimensions.get('window').height;

global.width = width => width * w / 750;//最后这个数是设计图的宽度
global.height = height => height * h / 1287;